package com.ruoyi.web.inventory.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.inventory.mapper.InventoryClassMapper;
import com.ruoyi.web.inventory.domain.InventoryClass;
import com.ruoyi.web.inventory.service.IInventoryClassService;

/**
 * 存货分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-19
 */
@Service
public class InventoryClassServiceImpl implements IInventoryClassService 
{
    @Autowired
    private InventoryClassMapper inventoryClassMapper;

    /**
     * 查询存货分类
     * 
     * @param cInvCCode 存货分类主键
     * @return 存货分类
     */
    @Override
    public InventoryClass selectInventoryClassByCInvCCode(String cInvCCode)
    {
        return inventoryClassMapper.selectInventoryClassByCInvCCode(cInvCCode);
    }

    /**
     * 查询存货分类列表
     * 
     * @param inventoryClass 存货分类
     * @return 存货分类
     */
    @Override
    public List<InventoryClass> selectInventoryClassList(InventoryClass inventoryClass)
    {
        return inventoryClassMapper.selectInventoryClassList(inventoryClass);
    }

    /**
     * 新增存货分类
     * 
     * @param inventoryClass 存货分类
     * @return 结果
     */
    @Override
    public int insertInventoryClass(InventoryClass inventoryClass)
    {
        return inventoryClassMapper.insertInventoryClass(inventoryClass);
    }

    /**
     * 修改存货分类
     * 
     * @param inventoryClass 存货分类
     * @return 结果
     */
    @Override
    public int updateInventoryClass(InventoryClass inventoryClass)
    {
        return inventoryClassMapper.updateInventoryClass(inventoryClass);
    }

    /**
     * 批量删除存货分类
     * 
     * @param cInvCCodes 需要删除的存货分类主键
     * @return 结果
     */
    @Override
    public int deleteInventoryClassByCInvCCodes(String[] cInvCCodes)
    {
        return inventoryClassMapper.deleteInventoryClassByCInvCCodes(cInvCCodes);
    }

    /**
     * 删除存货分类信息
     * 
     * @param cInvCCode 存货分类主键
     * @return 结果
     */
    @Override
    public int deleteInventoryClassByCInvCCode(String cInvCCode)
    {
        return inventoryClassMapper.deleteInventoryClassByCInvCCode(cInvCCode);
    }
}
